<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>使用脚本定时备份SSH中任意文件至SSH或任意网盘 | 我的作品集</title><meta name="keywords" content="网盘,OneDrive,教程,SSH"><meta name="author" content="金桔猪"><meta name="copyright" content="金桔猪"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="前言：跳过前言直准备接开始第三步为设置定时备份设置远程ip与密码时应删除&#96;&#96;符号与空格。格式参照： 1234567expect -c &quot;spawn scp $bakdescdir&#x2F;$orowner&#x2F;$bakdata root@172.0.0.1 :$remotePath  expect &amp;#123; \&quot;*password\&quot; &amp;#123;set timeout 50">
<meta property="og:type" content="article">
<meta property="og:title" content="使用脚本定时备份SSH中任意文件至SSH或任意网盘">
<meta property="og:url" content="https://pighog.vercel.app/p/a4f.html">
<meta property="og:site_name" content="我的作品集">
<meta property="og:description" content="前言：跳过前言直准备接开始第三步为设置定时备份设置远程ip与密码时应删除&#96;&#96;符号与空格。格式参照： 1234567expect -c &quot;spawn scp $bakdescdir&#x2F;$orowner&#x2F;$bakdata root@172.0.0.1 :$remotePath  expect &amp;#123; \&quot;*password\&quot; &amp;#123;set timeout 50">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img.pighog.repl.co/2022/03/psc.jpg">
<meta property="article:published_time" content="2022-04-04T00:20:22.000Z">
<meta property="article:modified_time" content="2022-05-20T15:22:52.149Z">
<meta property="article:author" content="金桔猪">
<meta property="article:tag" content="网盘">
<meta property="article:tag" content="OneDrive">
<meta property="article:tag" content="教程">
<meta property="article:tag" content="SSH">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img.pighog.repl.co/2022/03/psc.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://pighog.vercel.app/p/a4f"><link rel="preconnect" href="//cdn.jsdelivr.net"/><meta/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":false,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: {"limitDay":500,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":10,"languages":{"author":"作者: 金桔猪","link":"链接: ","source":"来源: 我的作品集","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '使用脚本定时备份SSH中任意文件至SSH或任意网盘',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-05-20 23:22:52'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="referrer" content="never"><link rel="stylesheet" href="https://theme.pigp.repl.co/css/index.acfdffc3.css"><link rel="stylesheet" href="https://getoken.pighog.repl.co/heoMainColor.css"><link rel="stylesheet" href="https://getoken.pighog.repl.co/rightmenu.css"><link rel="stylesheet" type="text/css" href="https://getoken.pighog.repl.co/categoryBar.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-swiper/swiper/swiper.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-swiper/swiper/swiperstyle.css"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.2.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/0.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">17</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa-solid fa-child"></i><span> 我的</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/musics/"><i class="fa-fw fa fa-music"></i><span> 音乐分享</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fa fa-film"></i><span> 电影分享</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 文章分类</span></a></li><li><a class="site-page child" href="/gallery/"><i class="fa-fw fa-solid fa-photo-film"></i><span> 相册分享</span></a></li><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-heart"></i><span> 关于本站</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://allblog.vercel.app/"><i class="fa-fw fa fa-link"></i><span> 友链</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://img.pighog.repl.co/2022/03/psc.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">我的作品集</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa-solid fa-child"></i><span> 我的</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/musics/"><i class="fa-fw fa fa-music"></i><span> 音乐分享</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fa fa-film"></i><span> 电影分享</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 文章分类</span></a></li><li><a class="site-page child" href="/gallery/"><i class="fa-fw fa-solid fa-photo-film"></i><span> 相册分享</span></a></li><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-heart"></i><span> 关于本站</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://allblog.vercel.app/"><i class="fa-fw fa fa-link"></i><span> 友链</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">使用脚本定时备份SSH中任意文件至SSH或任意网盘</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-04-04T00:20:22.000Z" title="发表于 2022-04-04 08:20:22">2022-04-04</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-05-20T15:22:52.149Z" title="更新于 2022-05-20 23:22:52">2022-05-20</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">631</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>2分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="前言："><a href="#前言：" class="headerlink" title="前言："></a>前言：</h1><p>跳过前言直准备接开始<del>第三步为设置定时备份</del>设置远程ip与密码时应删除<code>``</code>符号与空格。格式参照：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">expect -c <span class="string">&quot;</span></span><br><span class="line"><span class="string">spawn scp <span class="variable">$bakdescdir</span>/<span class="variable">$orowner</span>/<span class="variable">$bakdata</span> root@172.0.0.1 :<span class="variable">$remotePath</span>  </span></span><br><span class="line"><span class="string">expect &#123;</span></span><br><span class="line"><span class="string"> \&quot;*password\&quot; &#123;set timeout 500; send \&quot;changethispasswd\r\&quot;;&#125;</span></span><br><span class="line"><span class="string"> \&quot;yes/no\&quot; &#123;send \&quot;yes\r\&quot;; exp_continue;&#125;</span></span><br><span class="line"><span class="string"> &#125;</span></span><br><span class="line"><span class="string">expect eof&quot;</span>  </span><br></pre></td></tr></table></figure>

<h1 id="开始："><a href="#开始：" class="headerlink" title="开始："></a>开始：</h1><p>准备好要备份的机器Linux等</p>
<h4 id="1-在需要备份的机器中执行-yum-install-y-expect-安装expect插件（可选-yum-install-y-coscmd-使用cos对象存储）"><a href="#1-在需要备份的机器中执行-yum-install-y-expect-安装expect插件（可选-yum-install-y-coscmd-使用cos对象存储）" class="headerlink" title="1. 在需要备份的机器中执行  yum install -y expect 安装expect插件（可选 yum install -y coscmd 使用cos对象存储）"></a>1. 在需要备份的机器中执行  <code>yum install -y expect</code> 安装expect插件（可选 <code>yum install -y coscmd</code> 使用cos对象存储）</h4><h4 id="2-复制备份脚本-new-sh-至需要备份的机器-x2F-root"><a href="#2-复制备份脚本-new-sh-至需要备份的机器-x2F-root" class="headerlink" title="2. 复制备份脚本 new.sh 至需要备份的机器 &#x2F;root"></a>2. 复制备份脚本 new.sh 至需要备份的机器 &#x2F;root</h4><h4 id="3-设置cron定时备份：执行-crontab-e-在弹出的界面中按-i-后输入-0-0-root-new-sh-后按键盘-esc-键-输入-wq-保存"><a href="#3-设置cron定时备份：执行-crontab-e-在弹出的界面中按-i-后输入-0-0-root-new-sh-后按键盘-esc-键-输入-wq-保存" class="headerlink" title="3. 设置cron定时备份：执行 crontab -e 在弹出的界面中按 i 后输入 0 0 * * * /root/new.sh 后按键盘 esc 键 输入 :wq 保存"></a>3. 设置cron定时备份：执行 <code>crontab -e</code> 在弹出的界面中按 <code>i</code> 后输入 <code>0 0 * * * /root/new.sh</code> 后按键盘 <code>esc</code> 键 输入 <code>:wq</code> 保存</h4><h4 id="4-执行-service-crond-restart-重启cron定时服务"><a href="#4-执行-service-crond-restart-重启cron定时服务" class="headerlink" title="4. 执行 service crond restart 重启cron定时服务"></a>4. 执行 <code>service crond restart</code> 重启cron定时服务</h4><h4 id="5-sh-new-sh-测试-内容："><a href="#5-sh-new-sh-测试-内容：" class="headerlink" title="5. sh new.sh #测试 内容："></a>5. sh new.sh #测试 内容：</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#!/bin/sh</span></span><br><span class="line">dateTime=`<span class="built_in">date</span> +%Y_%m_%d_%H_%M_%S`       <span class="comment">#获取当前系统时间</span></span><br><span class="line">days=7       <span class="comment">#删除7天前的备份数据</span></span><br><span class="line">orowner=root    <span class="comment"># 备份到此用户下</span></span><br><span class="line">bakdescdir=/root/backup       <span class="comment">#备份文件到该路径</span></span><br><span class="line">bakdata=<span class="variable">$orowner</span><span class="string">&quot;_&quot;</span><span class="variable">$dateTime</span>.tar.gz     <span class="comment">#备份文件名</span></span><br><span class="line">baklog=<span class="variable">$orowner</span><span class="string">&quot;_&quot;</span><span class="variable">$dateTime</span>.<span class="built_in">log</span>       <span class="comment">#备份日志</span></span><br><span class="line">baksrcdir=/var/lib/mysql    	<span class="comment">#需要备份的文件</span></span><br><span class="line">remotePath=/root/backup     <span class="comment">#远程服务器的路径</span></span><br><span class="line"></span><br><span class="line"><span class="built_in">mkdir</span> <span class="variable">$bakdescdir</span>			<span class="comment">#新建backup文件夹</span></span><br><span class="line"><span class="built_in">cd</span> <span class="variable">$bakdescdir</span>    	    <span class="comment">#进入备份目录</span></span><br><span class="line"><span class="built_in">mkdir</span> -p <span class="variable">$orowner</span>    <span class="comment">#按需要备份的用户创建目录     </span></span><br><span class="line"><span class="built_in">cd</span> <span class="variable">$orowner</span>     		  <span class="comment">#进入目录</span></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;backup start at <span class="variable">$dateTime</span>&quot;</span> &gt; <span class="variable">$baklog</span></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;--------------------------&quot;</span> &gt;&gt;<span class="variable">$baklog</span></span><br><span class="line">tar -zcvf <span class="variable">$bakdata</span> <span class="variable">$baksrcdir</span> <span class="variable">$baklog</span>       <span class="comment">#压缩备份文件和日志文件</span></span><br><span class="line"></span><br><span class="line">find <span class="variable">$bakdescdir</span>/<span class="variable">$orowner</span> -<span class="built_in">type</span> f -name <span class="string">&quot;*.log&quot;</span> -<span class="built_in">exec</span> <span class="built_in">rm</span> &#123;&#125; \;     </span><br><span class="line"><span class="comment">#删除日志文件</span></span><br><span class="line">find <span class="variable">$bakdescdir</span>/<span class="variable">$orowner</span> -<span class="built_in">type</span> f -name <span class="string">&quot;*.tar.gz&quot;</span> -mtime +<span class="variable">$days</span> -<span class="built_in">exec</span>   <span class="built_in">rm</span> -rf &#123;&#125; \;</span><br><span class="line"><span class="comment">#删除 7 天前的备份</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#设置远程服务器ssh上传 使用expect插件自动输入密码</span></span><br><span class="line">expect -c <span class="string">&quot;</span></span><br><span class="line"><span class="string">spawn scp <span class="variable">$bakdescdir</span>/<span class="variable">$orowner</span>/<span class="variable">$bakdata</span> root@ `远程服务器ip` :<span class="variable">$remotePath</span>  </span></span><br><span class="line"><span class="string">expect &#123;</span></span><br><span class="line"><span class="string"> \&quot;*password\&quot; &#123;set timeout 500; send \&quot; `远程服务器密码` \r\&quot;;&#125;</span></span><br><span class="line"><span class="string"> \&quot;yes/no\&quot; &#123;send \&quot;yes\r\&quot;; exp_continue;&#125;</span></span><br><span class="line"><span class="string"> &#125;</span></span><br><span class="line"><span class="string">expect eof&quot;</span>  </span><br><span class="line"></span><br><span class="line"><span class="comment">#设置上传到腾讯COS对象存储</span></span><br><span class="line">coscmd config -a COS AccessId -s COS SecretKey -b 桶名称 -r 桶地区 -m 10</span><br><span class="line">coscmd upload -r -s <span class="variable">$bakdescdir</span>/<span class="variable">$orowner</span>/<span class="variable">$bakdata</span></span><br></pre></td></tr></table></figure>

<h4 id="6-备份数据库的方法很多，这里用最笨的，直接备份文件。如果你没有远程服务器，可以使用微软的-Power-Automate-自动将-SSH-中的文件同步至Onedrive"><a href="#6-备份数据库的方法很多，这里用最笨的，直接备份文件。如果你没有远程服务器，可以使用微软的-Power-Automate-自动将-SSH-中的文件同步至Onedrive" class="headerlink" title="6. 备份数据库的方法很多，这里用最笨的，直接备份文件。如果你没有远程服务器，可以使用微软的 Power Automate 自动将 SSH 中的文件同步至Onedrive"></a>6. 备份数据库的方法很多，这里用最笨的，直接备份文件。如果你没有远程服务器，可以使用微软的 Power Automate 自动将 SSH 中的文件同步至Onedrive</h4><h4 id="7-如果输入crontab-e报错请百度解决方法，一般是-环境有问题，可以尝试安装-yum-install-y-vixie-cron-或-yum-install-cronie-或百度！"><a href="#7-如果输入crontab-e报错请百度解决方法，一般是-环境有问题，可以尝试安装-yum-install-y-vixie-cron-或-yum-install-cronie-或百度！" class="headerlink" title="7. 如果输入crontab -e报错请百度解决方法，一般是 环境有问题，可以尝试安装 yum install -y vixie-cron 或 yum install cronie 或百度！"></a>7. 如果输入crontab -e报错请百度解决方法，一般是 环境有问题，可以尝试安装 <code>yum install -y vixie-cron</code> 或 <code>yum install cronie</code> 或百度！</h4><h4 id="8-文章备份：https-allblog-vercel-app-article-01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5"><a href="#8-文章备份：https-allblog-vercel-app-article-01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5" class="headerlink" title="8.文章备份：https://allblog.vercel.app/article/01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5"></a>8.文章备份：<a target="_blank" rel="noopener" href="https://allblog.vercel.app/article/01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5">https://allblog.vercel.app/article/01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5</a></h4></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://pighog.vercel.app">金桔猪</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://pighog.vercel.app/p/a4f.html">https://pighog.vercel.app/p/a4f.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://pighog.vercel.app" target="_blank">我的作品集</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E7%BD%91%E7%9B%98/">网盘</a><a class="post-meta__tags" href="/tags/OneDrive/">OneDrive</a><a class="post-meta__tags" href="/tags/%E6%95%99%E7%A8%8B/">教程</a><a class="post-meta__tags" href="/tags/SSH/">SSH</a></div><div class="post_share"><div class="social-share" data-image="https://img.pighog.repl.co/2022/03/psc.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/gh/overtrue/share.js@master/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/img/wx.png" target="_blank"><img class="post-qr-code-img" src="/img/wx.png" alt="wechat"/></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/img/zfb.png" target="_blank"><img class="post-qr-code-img" src="/img/zfb.png" alt="alipay"/></a><div class="post-qr-code-desc">alipay</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/p/aa4a.html"><img class="prev-cover" src="https://img.pighog.repl.co/2022/03/psc3.jpg" onerror="onerror=null;src='/img/404.gif'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">使用Replit白嫖各种语言项目</div></div></a></div><div class="next-post pull-right"><a href="/p/439d.html"><img class="next-cover" src="https://gitlab.com/valetzx/pubfile/raw/main/img/computer/star1.jpg" onerror="onerror=null;src='/img/404.gif'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">使用ZeroTier居家办公</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/p/a8f2.html" title="使用Typora写作并配置PicGo图床推荐"><img class="cover" src="https://img.pighog.repl.co/2022/03/psc3.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-03-12</div><div class="title">使用Typora写作并配置PicGo图床推荐</div></div></a></div><div><a href="/p/439d.html" title="使用ZeroTier居家办公"><img class="cover" src="https://gitlab.com/valetzx/pubfile/raw/main/img/computer/star1.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-03-22</div><div class="title">使用ZeroTier居家办公</div></div></a></div><div><a href="/p/a7fa.html" title="使用GithubAction推送仓库至任意网盘"><img class="cover" src="https://img.pighog.repl.co/2022/03/psc.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-03-10</div><div class="title">使用GithubAction推送仓库至任意网盘</div></div></a></div><div><a href="/p/aa4a.html" title="使用Replit白嫖各种语言项目"><img class="cover" src="https://img.pighog.repl.co/2022/03/psc3.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-04-17</div><div class="title">使用Replit白嫖各种语言项目</div></div></a></div><div><a href="/p/cb20.html" title="使用Replit白嫖3G MC 服务器"><img class="cover" src="https://img.pighog.repl.co/2022/03/psc.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-04-19</div><div class="title">使用Replit白嫖3G MC 服务器</div></div></a></div><div><a href="/p/1849.html" title="在Replit中配置Nix环境"><img class="cover" src="https://gitlab.com/valetzx/pubfile/raw/main/img/computer/star1.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-04-20</div><div class="title">在Replit中配置Nix环境</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div><div id="comment-switch"><span class="first-comment">Gitalk</span><span class="switch-btn"></span><span class="second-comment">Valine</span></div></div><div class="comment-wrap"><div><div id="gitalk-container"></div></div><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/0.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">金桔猪</div><div class="author-info__description">喜欢就要认真做</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">17</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/valetzx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://space.bilibili.com/156751467" target="_blank" title="BliBli"><i class="fa-brands fa-bilibili"></i></a><a class="social-icon" href="mailto:mail@pigpigeon.onmicrosoft.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://qm.qq.com/cgi-bin/qm/qr?k=2wPlQeQh4Dy5o3hcKUve5I0A4NkZRdIR&amp;noverify=0" target="_blank" title="QQ"><i class="fab fa-qq"></i></a><a class="social-icon" href="https://cloud.learnonly.xyz" target="_blank" title="Cloud"><i class="fa-solid fa-cloud-arrow-up"></i></a><a class="social-icon" href="https://alist.learnonly.xyz" target="_blank" title="Cloud"><i class="fa-solid fa-cloud-arrow-down"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">Nothing important Have fun <br /> 主站：<a href="https://pighog.vercel.app">https://pighog.vercel.app</a> <br /> 静态：<a target="_blank" rel="noopener" href="https://valetzx.github.io">https://valetzx.github.io</a> <br /> 博客：<a target="_blank" rel="noopener" href="https://allblog.vercel.app">https://allblog.vercel.app</a></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%89%8D%E8%A8%80%EF%BC%9A"><span class="toc-number">1.</span> <span class="toc-text">前言：</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%BC%80%E5%A7%8B%EF%BC%9A"><span class="toc-number">2.</span> <span class="toc-text">开始：</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-%E5%9C%A8%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E7%9A%84%E6%9C%BA%E5%99%A8%E4%B8%AD%E6%89%A7%E8%A1%8C-yum-install-y-expect-%E5%AE%89%E8%A3%85expect%E6%8F%92%E4%BB%B6%EF%BC%88%E5%8F%AF%E9%80%89-yum-install-y-coscmd-%E4%BD%BF%E7%94%A8cos%E5%AF%B9%E8%B1%A1%E5%AD%98%E5%82%A8%EF%BC%89"><span class="toc-number">2.0.0.1.</span> <span class="toc-text">1. 在需要备份的机器中执行  yum install -y expect 安装expect插件（可选 yum install -y coscmd 使用cos对象存储）</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-%E5%A4%8D%E5%88%B6%E5%A4%87%E4%BB%BD%E8%84%9A%E6%9C%AC-new-sh-%E8%87%B3%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E7%9A%84%E6%9C%BA%E5%99%A8-x2F-root"><span class="toc-number">2.0.0.2.</span> <span class="toc-text">2. 复制备份脚本 new.sh 至需要备份的机器 &#x2F;root</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-%E8%AE%BE%E7%BD%AEcron%E5%AE%9A%E6%97%B6%E5%A4%87%E4%BB%BD%EF%BC%9A%E6%89%A7%E8%A1%8C-crontab-e-%E5%9C%A8%E5%BC%B9%E5%87%BA%E7%9A%84%E7%95%8C%E9%9D%A2%E4%B8%AD%E6%8C%89-i-%E5%90%8E%E8%BE%93%E5%85%A5-0-0-root-new-sh-%E5%90%8E%E6%8C%89%E9%94%AE%E7%9B%98-esc-%E9%94%AE-%E8%BE%93%E5%85%A5-wq-%E4%BF%9D%E5%AD%98"><span class="toc-number">2.0.0.3.</span> <span class="toc-text">3. 设置cron定时备份：执行 crontab -e 在弹出的界面中按 i 后输入 0 0 * * * &#x2F;root&#x2F;new.sh 后按键盘 esc 键 输入 :wq 保存</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-%E6%89%A7%E8%A1%8C-service-crond-restart-%E9%87%8D%E5%90%AFcron%E5%AE%9A%E6%97%B6%E6%9C%8D%E5%8A%A1"><span class="toc-number">2.0.0.4.</span> <span class="toc-text">4. 执行 service crond restart 重启cron定时服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#5-sh-new-sh-%E6%B5%8B%E8%AF%95-%E5%86%85%E5%AE%B9%EF%BC%9A"><span class="toc-number">2.0.0.5.</span> <span class="toc-text">5. sh new.sh #测试 内容：</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#6-%E5%A4%87%E4%BB%BD%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E6%96%B9%E6%B3%95%E5%BE%88%E5%A4%9A%EF%BC%8C%E8%BF%99%E9%87%8C%E7%94%A8%E6%9C%80%E7%AC%A8%E7%9A%84%EF%BC%8C%E7%9B%B4%E6%8E%A5%E5%A4%87%E4%BB%BD%E6%96%87%E4%BB%B6%E3%80%82%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%B2%A1%E6%9C%89%E8%BF%9C%E7%A8%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%8C%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E5%BE%AE%E8%BD%AF%E7%9A%84-Power-Automate-%E8%87%AA%E5%8A%A8%E5%B0%86-SSH-%E4%B8%AD%E7%9A%84%E6%96%87%E4%BB%B6%E5%90%8C%E6%AD%A5%E8%87%B3Onedrive"><span class="toc-number">2.0.0.6.</span> <span class="toc-text">6. 备份数据库的方法很多，这里用最笨的，直接备份文件。如果你没有远程服务器，可以使用微软的 Power Automate 自动将 SSH 中的文件同步至Onedrive</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-%E5%A6%82%E6%9E%9C%E8%BE%93%E5%85%A5crontab-e%E6%8A%A5%E9%94%99%E8%AF%B7%E7%99%BE%E5%BA%A6%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95%EF%BC%8C%E4%B8%80%E8%88%AC%E6%98%AF-%E7%8E%AF%E5%A2%83%E6%9C%89%E9%97%AE%E9%A2%98%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85-yum-install-y-vixie-cron-%E6%88%96-yum-install-cronie-%E6%88%96%E7%99%BE%E5%BA%A6%EF%BC%81"><span class="toc-number">2.0.0.7.</span> <span class="toc-text">7. 如果输入crontab -e报错请百度解决方法，一般是 环境有问题，可以尝试安装 yum install -y vixie-cron 或 yum install cronie 或百度！</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#8-%E6%96%87%E7%AB%A0%E5%A4%87%E4%BB%BD%EF%BC%9Ahttps-allblog-vercel-app-article-01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5"><span class="toc-number">2.0.0.8.</span> <span class="toc-text">8.文章备份：https:&#x2F;&#x2F;allblog.vercel.app&#x2F;article&#x2F;01VC3T5YZEW3R5W3EEDJHIRZZ4MWAWIQV5</span></a></li></ol></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/p/799e.html" title="使用GithubAction给任意网页截图"><img src="https://bing.icodeq.com/?1" onerror="this.onerror=null;this.src='/img/404.gif'" alt="使用GithubAction给任意网页截图"/></a><div class="content"><a class="title" href="/p/799e.html" title="使用GithubAction给任意网页截图">使用GithubAction给任意网页截图</a><time datetime="2022-05-08T00:15:08.000Z" title="发表于 2022-05-08 08:15:08">2022-05-08</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/p/34c.html" title="使用Graph获取微软永久客户端秘钥"><img src="https://bing.icodeq.com/?550029691" onerror="this.onerror=null;this.src='/img/404.gif'" alt="使用Graph获取微软永久客户端秘钥"/></a><div class="content"><a class="title" href="/p/34c.html" title="使用Graph获取微软永久客户端秘钥">使用Graph获取微软永久客户端秘钥</a><time datetime="2022-04-30T15:15:22.000Z" title="发表于 2022-04-30 23:15:22">2022-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/p/c99d.html" title="在Replit中自建监控网站"><img src="https://bing.icodeq.com/?550029691" onerror="this.onerror=null;this.src='/img/404.gif'" alt="在Replit中自建监控网站"/></a><div class="content"><a class="title" href="/p/c99d.html" title="在Replit中自建监控网站">在Replit中自建监控网站</a><time datetime="2022-04-22T15:15:22.000Z" title="发表于 2022-04-22 23:15:22">2022-04-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/p/1849.html" title="在Replit中配置Nix环境"><img src="https://gitlab.com/valetzx/pubfile/raw/main/img/computer/star1.jpg" onerror="this.onerror=null;this.src='/img/404.gif'" alt="在Replit中配置Nix环境"/></a><div class="content"><a class="title" href="/p/1849.html" title="在Replit中配置Nix环境">在Replit中配置Nix环境</a><time datetime="2022-04-20T04:15:22.000Z" title="发表于 2022-04-20 12:15:22">2022-04-20</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/p/cb20.html" title="使用Replit白嫖3G MC 服务器"><img src="https://img.pighog.repl.co/2022/03/psc.jpg" onerror="this.onerror=null;this.src='/img/404.gif'" alt="使用Replit白嫖3G MC 服务器"/></a><div class="content"><a class="title" href="/p/cb20.html" title="使用Replit白嫖3G MC 服务器">使用Replit白嫖3G MC 服务器</a><time datetime="2022-04-19T02:15:22.000Z" title="发表于 2022-04-19 10:15:22">2022-04-19</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">search.local_search.label</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="fa-solid fa-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="fa-solid fa-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="fa-solid fa-arrow-rotate-right"></i></div><div class="rightMenu-item" id="menu-home"><i class="fa-solid fa-house"></i></div></div><div class="rightMenu-group rightMenu-line"><a class="rightMenu-item" id="menu-radompage" href="/random.html"><i class="fa-solid fa-shoe-prints"></i><span>随便逛逛</span></a><div class="rightMenu-item" id="menu-darkmode"><i class="fa-solid fa-moon"></i><span>切换模式</span></div><div class="rightMenu-item" id="menu-translate"><i class="fa-solid fa-earth-asia"></i><span>繁简切换</span></div></div></div><div id="rightmenu-mask" onclick="RemoveRightMenu()"></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>function addGitalkSource () {
  const ele = document.createElement('link')
  ele.rel = 'stylesheet'
  ele.href= 'https://cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.css'
  document.getElementsByTagName('head')[0].appendChild(ele)
}

function loadGitalk () {
  function initGitalk () {
    var gitalk = new Gitalk(Object.assign({
      clientID: '5785df1bc92f58036772',
      clientSecret: 'fd863e159f1385d059e7f214bcaae05294da54f7',
      repo: 'valetzx.github.io',
      owner: 'valetzx',
      admin: ['valetzx'],
      id: '2dbbbd6a33783102bef7698ec7325a60',
      updateCountCallback: commentCount
    },null))

    gitalk.render('gitalk-container')
  }

  if (typeof Gitalk === 'function') initGitalk()
  else {
    addGitalkSource()
    getScript('https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js').then(initGitalk)
  }
}

function commentCount(n){
  let isCommentCount = document.querySelector('#post-meta .gitalk-comment-count')
  if (isCommentCount) {
    isCommentCount.innerHTML= n
  }
}

if ('Gitalk' === 'Gitalk' || !true) {
  if (true) btf.loadComment(document.getElementById('gitalk-container'), loadGitalk)
  else loadGitalk()
} else {
  function loadOtherComment () {
    loadGitalk()
  }
}</script><script>function loadValine () {
  function initValine () {
    const valine = new Valine(Object.assign({
      el: '#vcomment',
      appId: 'nCoIhlJ63Vn9g8dEnnz0Ot5i-gzGzoHsz',
      appKey: 'DtHMAFlkYz8uwFL4wgx5cSjn',
      avatar: 'hide',
      serverURLs: '',
      emojiMaps: "",
      path: window.location.pathname,
      visitor: false
    }, null))
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Gitalk' === 'Valine' || !true) {
  if (true) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script async data-pjax src="https://getoken.pighog.repl.co/rightmenu.js"></script><script data-pjax="" src="https://getoken.pighog.repl.co/jquery.min.js"></script><script async src="https://getoken.pighog.repl.co/categoryBar.js"></script></div><!-- hexo injector body_end start --> <script data-pjax>if(document.getElementById('recent-posts') && location.pathname =='/'){
    
    var parent = document.getElementById('recent-posts');
    var child = '<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms"><div class="blog-slider__img"><img src="http://bing.icodeq.com/?2" alt="http://bing.icodeq.com/?2"/></div><div class="blog-slider__content"><span class="blog-slider__code">2022-02-25</span><a class="blog-slider__title" href="p/a5af.html">我的21年毕设</a><div class="blog-slider__text">这是我2021年的毕业设计，主题为 “魔术盒子”：将4米5 见方的盒子排列组合，形成建筑原始结构，并进行配套室内、外环境设计；</div><a class="blog-slider__button" href="p/a5af.html">详情</a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms"><div class="blog-slider__img"><img src="https://gitlab.com/valetzx/pubfile/raw/main/img/computer/star1.jpg" alt="https://gitlab.com/valetzx/pubfile/raw/main/img/computer/star1.jpg"/></div><div class="blog-slider__content"><span class="blog-slider__code">2022-02-26</span><a class="blog-slider__title" href="p/a95e.html">截止文章发表日期所获成就及奖项</a><div class="blog-slider__text">2017-2021获奖情况</div><a class="blog-slider__button" href="p/a95e.html">详情</a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms"><div class="blog-slider__img"><img src="https://img.pighog.repl.co/2022/04/600kens.jpg" alt="https://img.pighog.repl.co/2022/04/600kens.jpg"/></div><div class="blog-slider__content"><span class="blog-slider__code">2022-02-24</span><a class="blog-slider__title" href="p/13bd.html">课程作业-别墅设计</a><div class="blog-slider__text">大作业，两个联排打通改一户，要配置电梯。点击查看彩平等详细布置方案。</div><a class="blog-slider__button" href="p/13bd.html">详情</a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms"><div class="blog-slider__img"><img src="https://img.pighog.repl.co/2022/03/swiper.jpg" alt="https://img.pighog.repl.co/2022/03/swiper.jpg"/></div><div class="blog-slider__content"><span class="blog-slider__code">2022-03-08</span><a class="blog-slider__title" href="p/dc3a.html">做完毕设后的假期</a><div class="blog-slider__text">2022</div><a class="blog-slider__button" href="p/dc3a.html">详情</a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>';
    console.log('已挂载swiper')
    parent.insertAdjacentHTML("afterbegin",child)}
     </script>
<script data-pjax src="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-swiper/swiper/swiper.min.js"></script>
<script data-pjax src="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-swiper@0.18/swiper/swiperindex.js"></script>
<style></style><!-- hexo injector body_end end --></body></html>